home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / pyshared / computerjanitor / exc.py < prev    next >
Encoding:
Python Source  |  2009-04-27  |  975 b   |  31 lines

  1. # exc.py - exceptions for computerjanitor
  2. # Copyright (C) 2008  Canonical, Ltd.
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, version 3 of the License.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  15.  
  16.  
  17. import computerjanitor
  18. _ = computerjanitor.setup_gettext()
  19.  
  20.  
  21. class ComputerJanitorException(Exception):
  22.  
  23.     def __str__(self):
  24.         return self._str
  25.  
  26.  
  27. class UnimplementedMethod(ComputerJanitorException):
  28.  
  29.     def __init__(self, method):
  30.         self._str = _("Unimplemented method: %s") % str(method)
  31.